#ifndef SKYBOX_CUBEMAP_H
#define SKYBOX_CUBEMAP_H

#include "../Config/Export.h"
#include "../Core/IDrawable.h"
#include "../Core/DVBO.h"
#include "../Maths/TVector3.h"

/* 
 * this Skybox uses the ARB cubemap and VBOs extensions,
 * if thoses extension are not supported,
 * you should use an other version
 */
 
namespace epix {

class SHARED Skybox : public IDrawable, public DVBO
{
	public:

		Skybox(const char *back, const char *front,
				const char *bottom, const char *top,
				const char *right, const char *left);
		~Skybox();

		void load(const char *back, const char *front,
				const char *bottom, const char *top,
				const char *right, const char *left);

		void setPosition(const Vector3d &pos);
		void setSize(float size);

		const float getSize() const;
		const Vector3d &getPosition() const;
		
		void clear();

		virtual void draw();

	private:

		void create(const char *back, const char *front,
					const char *bottom, const char *top,
					const char *right, const char *left);

		Skybox(Skybox&);
		const Skybox &operator=(Skybox&);

		GLuint _cubemap;
		float _size;
		Vector3d _pos;

};

}

#endif
